/**
 * @Author: leibidong
 * @Description:  redis的常量key
 * @File:  redisConstant
 * @Version: 1.0.0
 * @Date: 2021/7/3 16:08
 */

package utils

const (
	LOGIN                 = "login"
	PRODUCTFIRSTCATEGORY  = "productfirstcategory"
	PRODUCTSECONDCATEGORY = "productsecondcategory"
	PRODUCTINFO           = "productinfo"
	WAREHOUSEPRODUCT      = "warehouseproduct"
)

//状态登录redis的key
func GetRedisLoginToken(token string) (s string) {
	return LOGIN + token
}

//一级商品类目redis的key
func GetProductFirstCategory() (s string) {
	return PRODUCTFIRSTCATEGORY
}

//二级商品类目redis的key
func GetProductSecondCategory(firstName string) (s string) {
	return PRODUCTSECONDCATEGORY + firstName
}

//商品信息的redis的key
func GetProductInfo(name string) string {
	return PRODUCTINFO + name
}

//商品库存信息的redis的key
func GetWareHouseProduct() string {
	return WAREHOUSEPRODUCT
}
